<!-- $Id: adminLog.html 67 2011-03-26 13:06:51Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<script type="text/javascript">
function confirmSubmit(form){
	var j = 0;
	for(var i=0; i<form.elements.length; i++){
		if(form.elements[i].name == "key[]"){
			if(form.elements[i].checked){
				j++;
			}
		}
	}
	if(j == 0){
		alert("{$Think.lang.select_someone}");
		return false;
	}
	else{
		var r = confirm("{$Think.lang.confirm}");
		return r == true ? true : false;
	}
}

function sortBy(order,sort){
	location.href = "?order="+order+"&sort="+sort;
}
</script>
<div class="form-div">
  <table>
    <tbody>
      <tr>
        <td width="50%"><form name="theForm" method="post" action="__URL__/adminLog">
            {$Think.lang.view_ip}
            <select name="log_ip">
              <option value="">{$Think.lang.select_ip}</option>
              <volist name="list_ip" id="vo">
                <option value="{$vo.log_ip}">{$vo.log_ip}</option>
              </volist>
            </select>
            <input value="{$Think.lang.submit}" class="button" type="submit" >
          </form></td>
        <td><form name="theForm2" action="__URL__/delLog" method="post">
            {$Think.lang.drop_logs}
            <select name="log_time">
              <option value='0'>{$Think.lang.select_date}</option>
              <option value='1'>{$Think.lang.week_date}</option>
              <option value='2'>{$Think.lang.month_date}</option>
              <option value='3'>{$Think.lang.three_month}</option>
              <option value='4'>{$Think.lang.six_month}</option>
              <option value='5'>{$Think.lang.a_year}</option>
            </select>
            <input name="drop_type_date" type="submit" value="{$Think.lang.submit}" class="button" onclick="return confirm('{$Think.lang.confirm}');"/>
          </form></td>
      </tr>
    </tbody>
  </table>
</div>
<form method="post" action="__URL__/delLog" name="listForm" onsubmit="return confirmSubmit(this);">
  <div class="list-div" id="listDiv">
    <table cellpadding="3" cellspacing="1">
      <tbody>
        <tr>
          <th><input type="checkbox" id="chkOpenAll" onclick="openAll(this)" />
            <a href="javascript:void(0)" onclick="javascript:sortBy('log_id','<if condition="$sort eq asc">desc<else/>asc</if>');" title="{$Think.lang.sort}">{$Think.lang.numbers}</a>
            <if condition="$sort eq asc"><img src="__PUBLIC__/Images/sort_asc.gif"/><else/><img src="__PUBLIC__/Images/sort_desc.gif"/></if></th>
          <th>{$Think.lang.log_name}</th>
          <th>{$Think.lang.log_ip}</th>
          <th>{$Think.lang.log_script}</th>        
          <th>{$Think.lang.handler}</th>
		  <th>{$Think.lang.time}</th>
        </tr>
        <volist name="list" id="vo">
          <tr>
            <td style="background-color: rgb(255, 255, 255);" width="7%" class="first-cell"><input type="checkbox" id="key" name="key[]" onclick="openAll()" value="{$vo.log_id}" />{$vo.log_id}</td>
            <td style="background-color: rgb(255, 255, 255);" align="center" class="first-cell" width="9%">{$vo.user_name}</td>
            <td style="background-color: rgb(255, 255, 255);" align="center" width="11%"><span>{$vo.log_ip}</span></td>
            <td style="background-color: rgb(255, 255, 255);" align="left" width="35%"><span>{$vo.log_script}</span></td>
			<td style="background-color: rgb(255, 255, 255);" align="left"><span>{$vo.log_info}</span></td>
            <td style="background-color: rgb(255, 255, 255);" align="center" width="14%"><span>{$vo.log_time|date='Y-m-d H:i:s',###}</span></td>       
          </tr>
        </volist>
        <tr>
          <td colspan="2"><input value="{$Think.lang.drop_logs}" id="btnSubmit" name="btnSubmit" class="button" disabled="true" type="submit"></td>
          <td style="background-color: rgb(255, 255, 255);" colspan="4" align="right" nowrap="true"><div class="{$pagestyle}" id="turn-page">{$page}</div></td>
        </tr>
      </tbody>
    </table>
  </div>
</form>
<include file="Public:pagefooter"/> 